package com.fram.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fram.bean.admin.news.response.NewsListResponse;
import com.fram.bean.api.news.request.NewsSearchRequest;
import com.fram.bean.api.news.response.NewsDetailResponse;
import com.fram.bean.api.news.response.NewsSearchResponse;
import com.fram.entity.NewsList;

public interface NewsListMapper {
	
	int deleteByPrimaryKey(Long id);

	int insert(NewsList record);

	// 新增（头条热门新闻）
	int insertSelective(NewsList record);

	// 新闻详情
	NewsList selectByPrimaryKey(Long id);

	// 冻结（头条热门新闻）
	int updateByPrimaryKeySelective(NewsList record);

	int updateByPrimaryKey(NewsList record);

	// 后台查询
	List<NewsListResponse> selectNewsList(NewsList request);

	/** 前端查询新闻列表 **/
	List<NewsSearchResponse> selectForApiList(NewsSearchRequest request);

	/** 前端查询新闻详情 **/
	NewsDetailResponse detailForApi(@Param("newsId") Long newsId, @Param("userId") Long userId);

}